home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
asmexam.arc
/
MEMSIZE.ASM
< prev
next >
Wrap
Assembly Source File
|
1983-11-17
|
1KB
|
48 lines
name memsize
page 55,132
title MEMSIZE - reset PC/DOS memory size variable
; for IBM PC memsize variable at location 40:13h
; is # of K bytes see technical reference p A-2
;
; for TI PC memsize variable at 0:0198h
; is # of paragraphs ie 16 byte blocks see technical
; reference p 3-6
;
cseg segment byte
assume cs:cseg,ds:cseg
org 100h
start: mov bx,40h ; for TI PC make this 00h
mov ds,bx
mov bx,013h ; for TI PC make this 0198h
mov ax,[bx]
cmp word ptr [bx],220h ; for TI PC change 220h to 8800h
jl exit1
mov ax,8800h
mov bx,0
loop1: cmp ax,0a000h ; for TIPC change 0a000h to 0c000h
je exit2
mov ds,ax
mov [bx],ax
mov cx,[bx]
cmp ax,cx
jne exit2
mov ax,ds
inc ax
jmp loop1
exit2:
mov cl,6 ; for TI PC delete this line
shr ax,cl ; and delete this line
mov bx,40h ; for TI PC change 40h to 00h
mov ds,bx
mov bx,013h ; for TI PC chance 013h to 0198h
mov [bx],ax
exit1: int 20h
cseg ends
end start